package com.yuanfeng.business.controller;

import com.yuanfeng.business.dto.ShopDecorationBlockDTO;
import com.yuanfeng.commoms.dto.userms.UserTokenBeanDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName ShopDecorationBlockController
 * @Description
 * @Author hyq
 * @Date 2023/8/4 9:34
 * @Version 1.0
 **/
@RestController
@RequestMapping("/shop/decorationBlock")
public class ShopDecorationBlockController extends BaseController{


    /**
     * 查询布局块
     *
     * @param param
     * @return
     */
    @PostMapping("/query")
    public ResponseResult queryShopDecorationBlock(@RequestBody UserTokenBeanDTO param) {
        ResponseResult result = shopDecorationBlockService.queryShopDecorationBlock(param);
        return result;
    }


    /**
     * 删除布局块
     *
     * @param param
     * @return
     */
    @PostMapping("/delete")
    public ResponseResult delShopDecorationBlock(@RequestBody Map<String,Object> param) {
        ResponseResult result = shopDecorationBlockService.delShopDecorationBlock(param);
        return result;
    }


    /**
     * 添加布局块
     *
     * @param param
     * @return
     */
    @PostMapping("/add")
    public ResponseResult addShopDecorationBlock(@RequestBody ShopDecorationBlockDTO param) {
        ResponseResult result = shopDecorationBlockService.addShopDecorationBlock(param);
        return result;
    }
}
